/*
 * @Description:赛事项目接口
 * @Autor: Song
 * @Date: 2022-11-02 11:25:41
 * @LastEditors: Song
 * @LastEditTime: 2023-02-19 20:41:26
 */
import service from "@/api/index";
//赛事项目相关接口
const COMPETI_TION_PROJECT_API = "/api/CompetitionProject/";
export default {
	GetCompetitionProjecListApi: (params: object) => {
		//获取赛事项目列表
		return service.post(`${COMPETI_TION_PROJECT_API}GetCompetitionProjecList`, params);
	},
	EditCompetitionProjecApi: (params: object) => {
		//编辑竞赛项目
		return service.post(`${COMPETI_TION_PROJECT_API}EditCompetitionProjec`, params);
	},
	EndSignUpApi: (params: string) => {
		//结束报名
		return service.post(`${COMPETI_TION_PROJECT_API}EndSignUp`, { Id: params });
	},
	EnableCompetitionProjectApi: (params: string) => {
		//赋能竞争项目
		return service.post(`${COMPETI_TION_PROJECT_API}EnableCompetitionProject`, {
			Id: params
		});
	},
	CloseCompetitionProjectApi: (params: string) => {
		//关闭竞争项目
		return service.post(`${COMPETI_TION_PROJECT_API}CloseCompetitionProject`, {
			Id: params
		});
	},
	GetCompetitionPorjectDetailsByIdApi: (params: string) => {
		//获取竞争详细信息ById
		return service.post(`${COMPETI_TION_PROJECT_API}GetCompetitionPorjectDetailsById`, { Id: params });
	},
	GetRuleListApi: (params: number, projectId: string) => {
		//获取规则列表
		return service.post(`${COMPETI_TION_PROJECT_API}GetRuleList`, {
			type: params,
			projectId
		});
	},
	GetGroupListApi: (data: any) => {
		//获取组列表
		return service.post(`${COMPETI_TION_PROJECT_API}GetGroupList`, data);
	},
	GetProjectTypeListApi: () => {
		//获取组列表
		return service.post(`/api/Project/GetProjectTypeList`);
	},
	//检验报名人数是否超过最大人数
	GetMaxEmployeeNumApi: (CompetitionProjectId: string) => {
		//获取组列表
		return service.post(`${COMPETI_TION_PROJECT_API}GetMaxEmployeeNum`, {
			CompetitionProjectId
		});
	},
	GetComProjectListByComIdApi: (CompetitionId: string) => {
		//获取组列表
		return service.post(`${COMPETI_TION_PROJECT_API}GetComProjectListByComId`, {
			CompetitionId
		});
	}
};
